package com.attendance.www.hr.constant;

import java.util.Properties;

public class AppConstant {
	private static Properties ps = null;
	static {
		if (ps == null) {
			ps = new Properties();
		}
		try {
			ps.load(Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("../conf/config.properties"));
		} catch (Exception e) {
			e.printStackTrace();
			// Logger.getLogger(CommonUtil.class).error("读取配置文件异常信息："+ExceptionUtils.getStackTrace(e));
		}

	}
	
	public static Properties getPS() {
		return ps;
	}

	public static final String SAVE_FILE_REPOSITORY = ps.getProperty("SAVE_FILE_REPOSITORY");
	
	public static final String STREAM_FILE_REPOSITORY = ps.getProperty("STREAM_FILE_REPOSITORY");

	public static final String SERVER_RESOURCE = ps.getProperty("server.resource");
	
	public static final String REPORT_RESOURCE = ps.getProperty("server.report_resource");
	
	public static final String UPLOAD_RESOURCE = ps.getProperty("server.upload_resource");
	
	public static final String TEMPLATE_RESOURCE = ps.getProperty("server.template_resource");
	
	public static final String SESSIONUSER = "user";
	public static final float SESSION_TIMEOUT = Float.parseFloat(ps.getProperty("session.timeout"))*60;
	
	public static final String MAXIMUMHOURS = ps.getProperty("MaximumHours"); 
	
	public static final String PASSWORD = ps.getProperty("Password");
	
	public static final String ENCRYPTKEY = ps.getProperty("EncryptKey");
	
	public static final String MAXIMUMDAY = ps.getProperty("MaximumDay");
	
	public static final String REPORTFILEREPOSITORY = ps.getProperty("REPORT_FILE_REPOSITORY");
	
	public static final String TEMPLATEFILEREPOSITORY = ps.getProperty("TEMPLATE_FILE_REPOSITORY");
	
	public static final String API_ALLOW_ACCESS = ps.getProperty("APIAllowAccess");
	
	public static final String LIBRARY_MYSQLDUMP = ps.getProperty("library.mysqldump");
	
	public static final String LIBRARY_ADDRESS = ps.getProperty("library.address");
	
	public static final String ACCESS_ADDRESS1 = ps.getProperty("access.address1");
	
	public static final String MAIL_TITLE = ps.getProperty("mail.title");
	
	public static final String MAIL_ENDING = ps.getProperty("mail.ending");
	
	public static final String MAIL_REJECT_CONTENT = ps.getProperty("mail.reject.content");
	
	public static final String MAIL_FORGET_PASSWORD_CONTENT = ps.getProperty("mail.forgetPassword.content");
	
	public static final String MAIL_APPROVAL_CONTENT = ps.getProperty("mail.approval.content");
	
	public static final String ATTENDANCE_REPORT_DAYS = ps.getProperty("attendanceReportDays");
	
	public static final String BPM_URL = ps.getProperty("BPM.url");
	
	public static final String BPM_ACCESS_KEY = ps.getProperty("BPM.access_key");
	
	public static final String BPM_REQUEST_URL = ps.getProperty("BPM.request.url");
	
	public static final String BPM_REQUEST_APPLY_INTERFACE = ps.getProperty("BPM.request.apply.interface");
	
	public static final String BPM_REQUEST_REVOKE_INTERFACE = ps.getProperty("BPM.request.revoke.interface");

	public static final String BPM_REQUEST_ACCESSKEY = ps.getProperty("BPM.request.accessKey");
	
	public static final String BPM_REQUEST_SECRET = ps.getProperty("BPM.request.secret");

	public static final String MAIN_IP = ps.getProperty("main.ip");
	
	public static final String MAIN_TOKEN_URL = ps.getProperty("main.token.url");
	
	public static final String MAIN_TOKEN_USERNAME = ps.getProperty("main.token.userName");
	
	public static final String MAIN_TOKEN_PASSWORD = ps.getProperty("main.token.password");
	
	public static final String MAIN_USER_DATA_URL = ps.getProperty("main.user.data.url");
	
	public static final String MAIN_USER_VERSION_URL = ps.getProperty("main.user.version.url");
	
	public static final String MAIN_USER_NEW_URL = ps.getProperty("main.user.new.url");
	
	public static final String MAIN_ORGANIZATION_DATA_URL = ps.getProperty("main.organization.data.url");
	
	public static final String MAIN_ORGANIZATION_VERSION_URL = ps.getProperty("main.organization.version.url");
	
	public static final String MAIN_ORGANIZATION_NEW_URL = ps.getProperty("main.organization.new.url");
	
	public static final String MAIN_JOBS_DATA_URL = ps.getProperty("main.jobs.data.url");
	
	public static final String MAIN_JOBS_VERSION_URL = ps.getProperty("main.jobs.version.url");
	
	public static final String MAIN_JOBS_NEW_URL = ps.getProperty("main.jobs.new.url");
	
	public static final String MAIN_MAIL_EMPLOYEENO = ps.getProperty("main.mail.employeeNo");
	
	public static final String MAIN_MAIL_CONTENTONE = ps.getProperty("main.mail.contentOne");
	
	public static final String MAIN_MAIL_CONTENTTWO = ps.getProperty("main.mail.contentTwo");
	
	public static final String APPLICATION_TYPE = ps.getProperty("application.type");
}
